package top.laoshuzi.designpatterns.base.created.builder;

/**
 * 具体建造者
 */
public class ConcreteBuilder implements Builder {

    private Product product = new Product();

    @Override
    public Builder buildPart1() {
        product.setPart1("Part1");
        return this;
    }

    @Override
    public Builder buildPart2() {
        product.setPart2("Part2");
        return this;
    }

    @Override
    public Builder buildPart3() {
        product.setPart3("Part3");
        return this;
    }

    @Override
    public Product build() {
        return product;
    }

}
